package cn.yunzhisheng.vui.assistant.tv;

import android.app.Dialog;
import android.content.Context;

public class VuiDialog extends Dialog {

    public VuiDialog(Context context, int theme) {
        super(context, theme);
    }

    protected VuiDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    public VuiDialog(Context context) {
        super(context);
    }

    protected VuiHandle mHandle;

    @Override
    public void onWindowFocusChanged(boolean hasFocus) {
        android.util.Log.e("jesus", "VuiDialog onWindowFocusChanged()" + hasFocus);
        try {
            if (hasFocus) {
                if (mHandle == null) {
                    mHandle = new VuiHandle(this);
                }
                mHandle.registerReceiver();
            } else {
                mHandle.unregisterReceiver();
            }
        } catch (Exception e) {

        }
        super.onWindowFocusChanged(hasFocus);
    }

}
